var x5Comp = {
	dropButton:$(".btn"),
	offset :$(".btn").offset(),
	dropMenu : $(".dropBtnMenu .dropDownMenu"),
	refCss : function(cssLocation){
		var cssNode = cssLocation+'?t='+new Date().getTime();/*附带时间参数，防止缓存*/ 
		var  linkStr = '<link rel="stylesheet" type="text/css" href='+cssNode+'/>';
		$('head').append(linkStr)
	},
	initDrop : function (){
		this.refCss('css/x5comp.css');
		this.refCss('css/font-awesome.min.css');
		this.dropMenu.css("top",this.offset.top+this.dropButton.outerHeight()+5);
		this.dropMenu.css("left",this.offset.left);
		
	}
};
x5Comp.initDrop();
x5Comp.showDropMenu = function (){
	if(this.dropMenu.css("display")=='none'){
//		this.dropMenu.css("display","block");
		$(".btn i").removeClass("fa-caret-down");
		$(".btn i").addClass("fa-caret-up");
	}else{
//		this.dropMenu.css("display","none");
		$(".btn i").removeClass("fa-caret-up");
		$(".btn i").addClass("fa-caret-down");
	}
	this.dropMenu.slideToggle('fast','linear');
}
x5Comp.openBaidu = function (){
	window.open('http://www.baidu.com');
}
x5Comp.openBilibili = function (){
	window.open('http://www.bilibili.com');
}
